<template>
  <view class="auth-container">
   
    <view class="header-section">
      <image src="/static/bg11.png" mode="aspectFill" class="header-image"></image>
    
    </view>
    
 
    <view class="form-container">
      <!-- 账号输入 -->
      <view class="form-item">
        <text class="form-label">账号:</text>
        <view class="input-wrapper">
          <image src="/static/logo.png" mode="aspectFit" class="input-icon"></image>
          <input type="text" v-model="account" placeholder="请输入账号" class="form-input"/>
        </view>
      </view>
      
      <!-- 学号输入 -->
      <view class="form-item">
        <text class="form-label">学号:</text>
        <view class="input-wrapper">
          <image src="/static/logo2.png" mode="aspectFit" class="input-icon"></image>
          <input type="text" v-model="studentId" placeholder="请输入学号" class="form-input"/>
        </view>
      </view>
      
      <!-- 身份证号码输入 -->
      <view class="form-item">
        <text class="form-label">身份证号码:</text>
        <view class="input-wrapper">
          <image src="/static/logo4.png" mode="aspectFit" class="input-icon"></image>
          <input type="text" v-model="idCard" placeholder="请输入身份证号码" class="form-input"/>
        </view>
      </view>
      
      <!-- 查询按钮 -->
      <button class="query-button" @click="queryReport">
        <image src="/static/logo5.jpg" mode="aspectFit" class="button-icon"></image>
        <text class="button-text">查询报告</text>
      </button>
    </view>
    
    
    <view class="footer-section">
      <text class="footer-text">成电芯仪提供技术支持</text>
    </view>
  </view>
</template>

<script>
  export default {
    data() {
      return {
        account: '',
        studentId: '',
        idCard: ''
      };
    },
    methods: {
      queryReport() {
        // 表单验证
        if (!this.account || !this.studentId || !this.idCard) {
          uni.showToast({
            title: '请填写完整信息',
            icon: 'none'
          });
          return;
        }
        
   
        if (this.idCard.length !== 18) {
          uni.showToast({
            title: '请输入正确的身份证号码',
            icon: 'none'
          });
          return;
        }
        
        
        console.log('查询报告信息:', {
          account: this.account,
          studentId: this.studentId,
          idCard: this.idCard
        });
        
  
        uni.showLoading({
          title: '查询中...'
        });
        

        uni.hideLoading();
        
      
       uni.showToast({
         title: '查询成功',
         icon: 'success',
         duration: 1000,
         success: () => {
           setTimeout(() => {
             uni.navigateTo({
               url: '/pages/qihang/qihang'
             });
           }, 1500); 
         }
       }); 
      }
    }
  };
</script>

<style scoped>
  .auth-container {
    width: 100%;
    min-height: 100vh;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
  }
  
  .header-section {
    position: relative;
    width: 375px;
    height: 337px;
    overflow: hidden;
  }
  
  .header-image {
  width: 375px;
  height: 337px;
  }
  
  .header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .header-title {
    color: white;
    font-size: 40rpx;
    font-weight: bold;
    text-align: center;
  }
  
  .form-container {
    width: 90%;
    margin: 40rpx auto;
    padding: 40rpx;
    background-color: white;
    border-radius: 20rpx;
    box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.1);
  }
  
  .form-item {
    margin-bottom: 40rpx;
  }
  
  .form-label {
    display: block;
    font-size: 28rpx;
    color: #333333;
    margin-bottom: 10rpx;
  }
  
  .input-wrapper {
    display: flex;
    align-items: center;
    border: 1rpx solid #dddddd;
    border-radius: 10rpx;
    padding: 20rpx;
  }
  
  .input-icon {
    width: 40rpx;
    height: 40rpx;
    margin-right: 20rpx;
  }
  
  .form-input {
    flex: 1;
    font-size: 28rpx;
    color: #333333;
  }
  
  .query-button {
    width: 100%;
    height: 90rpx;
    background-color: #0066cc;
    color: white;
    font-size: 32rpx;
    border-radius: 45rpx;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20rpx;
  }
  
  .button-icon {
    width: 36rpx;
    height: 36rpx;
    margin-right: 10rpx;
  }
  
  .footer-section {
    margin-top: auto;
    padding: 30rpx 0;
    text-align: center;
  }
  
  .footer-text {
    font-size: 24rpx;
    color: #999999;
  }
</style>